# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py3-snowballstemmer
_pkgname=snowballstemmer
pkgver=2.2.0
pkgrel=4
pkgdesc="Snowball stemming library collection for Python3"
url="https://github.com/shibukawa/snowball_py"
arch="noarch"
license="BSD-3-Clause"
depends="python3"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

replaces="py-snowballstemmer" # Backwards compatibility
provides="py-snowballstemmer=$pkgver-r$pkgrel" # Backwards compatibility
options="!check"

build() {
	gpep517 build-wheel --wheel-dir .dist --output-fd 3 3>&1 >&2
}

package() {
	python3 -m installer -d "$pkgdir" .dist/*.whl
}

sha512sums="
f1dee83e06fc79ffb250892fe62c75e3393b9af07fbf7cde413e6391870aa74934302771239dea5c9bc89806684f95059b00c9ffbcf7340375c9dd8f1216cd37  snowballstemmer-2.2.0.tar.gz
"
